﻿<div class="content-wrapper" ng-app="fitbitApp">
    <section class="content-header">
        <h1>
            Fitbit Connect
        </h1>
    </section>
    <section class="content" ng-controller="Dashboard as vm">
        @if (ViewBag.FitbitConnected == false)
        {
            <p>Welcome. Please connect your Fitbit account <a href="/Fitbit/Authorize">here</a>.</p>
            <p style="font-style:italic">(TIP: if local debugging, copy this page URL to the clipboard. On your return, make sure your callback url is correct, port number + /fitbit/callback?" )</p>
        }
        else
        {
            <p>Welcome Fitbit User @Session["FitbitUserId"].ToString()</p>

            <ul>
                <li><a href="/Fitbit/LastWeekDistance">View Last Week Distances</a></li>
                <li><a href="/Fitbit/LastWeekSteps">View Last Week Active Score</a></li>
                <li><a href="/Fitbit/LastYearWeight">View Last Year Weight</a></li>
                <li><a href="/Fitbit/LastYearFat">View Last Year Fat (Time Series API)</a></li>
                <li><a href="/Fitbit/MonthFat/@DateTime.UtcNow.AddDays(-30).ToString("yyyy-MM-dd")">View Last Month Fat (Body API)</a></li>
                <li><a href="/Fitbit/LastYearWeight">View Last Year Weight (Time Series API)</a></li>
                <li><a href="/Fitbit/MonthWeight/@DateTime.UtcNow.AddDays(-30).ToString("yyyy-MM-dd")">View Last Month Weight (Body API)</a></li>
            </ul>

        }

        <fitbit-activity-widget></fitbit-activity-widget>
    </section>
</div>

@section Scripts {
    <!-- AdminLTE App -->
    <script src="~/js/line-chart.min.js" type="text/javascript"></script>
    <script src="~/Scripts/jquery.knob.js"></script>
    <script src="~/app/app.core.module.js" type="text/javascript"></script>
    <script src="~/app/blocks/widgets/knob/angularKnob.js" type="text/javascript"></script>
    <script src="~/app/fitbit/fitbitApp.module.js" type="text/javascript"></script>
    <script src="~/app/fitbit/fitbitApp.config.js" type="text/javascript"></script>
    <script src="~/app/fitbit/fitbitApp.run.js" type="text/javascript"></script>
    <script src="~/app/fitbit/dashboard/dashboardCtrl.js" type="text/javascript"></script>
    <script src="~/app/fitbit/services/fitbitService.js" type="text/javascript"></script>
    @*<script src="~/app/fitbit/fitbitApp.route.js" type="text/javascript"></script>*@
    <script src="~/app/fitbit/widgets/fatInfoWidget.js" type="text/javascript"></script>
    <script src="~/app/fitbit/widgets/activity/activityWidget.js" type="text/javascript"></script>
    <script src="~/app/fitbit/helpers/graphHelper.js" type="text/javascript"></script>
    
}